<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1 (Feb 5, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Fibonacci Freeze</TITLE>
<META NAME="description" CONTENT="Fibonacci Freeze">
<META NAME="keywords" CONTENT="htmlatex">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="acm-00495_files/htmlatex.css">

<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
</HEAD>
<BODY LANG="EN" BGCOLOR=#FFFFFF>
 <H1><BR CLEAR=ALL><CENTER><TABLE BGCOLOR=#0060F0><TR><TD><B><FONT SIZE=5 COLOR=#C0FFFF>&nbsp;<A NAME="SECTION0001000000000000000000">Fibonacci Freeze</A></FONT>&nbsp;</B></TABLE></CENTER></H1>
<P>
The Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...) are defined by the recurrence:
<P> <IMG WIDTH=500 HEIGHT=68 ALIGN=BOTTOM ALT="eqnarray20" SRC="acm-00495_files/495img10.gif"  > <P>
<P>
Write a program to calculate the Fibonacci Numbers.
<P>
<H2><FONT COLOR=#0070E8><A NAME="SECTION0001001000000000000000">Input and Output</A></FONT></H2>
<P>
The input to your program would be a sequence of numbers smaller or equal than 5000, each on a separate line, specifying which
Fibonacci number to calculate.
<P>
<P>
Your program should output the Fibonacci number for each input value, one per line.
<P>
<H2><FONT COLOR=#0070E8><A NAME="SECTION0001002000000000000000">Sample Input</A></FONT></H2>
<P>
<PRE>5
7
11</PRE>
<P>
<H2><FONT COLOR=#0070E8><A NAME="SECTION0001003000000000000000">Sample Output</A></FONT></H2>
<P>
<PRE>The Fibonacci number for 5 is 5
The Fibonacci number for 7 is 13
The Fibonacci number for 11 is 89</PRE>
<P>
</BODY>
</HTML>

<!-- This document saved from http://acm.uva.es/problemset/v4/495.html -->
